{% extends "main.html" %}
{% block title %}Список уроков{% endblock %}
{% block content %}
<h1>Список уроков</h1>
<table>
{% for lesson in lessons %}
  <tr>
      {% ifequal lesson.status 0 %}
        <td bgcolor="pink">&nbsp;&nbsp;&nbsp;</td>
        <td>{{ forloop.counter }}.</td>   
        <td><a href="/lessons/{{lesson.id}}"><font color="lightgray">{{ lesson.title }}</font></a></td>
      {% else%}
        {% ifequal lesson.status 2 %}
          <td bgcolor="lightgreen">&nbsp;&nbsp;&nbsp;</td>
          <td>{{ forloop.counter }}.</td>   
          <td><a href="/lessons/{{lesson.id}}"><font color="gray">{{ lesson.title }}</font></a></td>
        {% else %}
          <td bgcolor="yellow">&nbsp;&nbsp;&nbsp;</td>
          <td>{{ forloop.counter }}.</td>   
          <td><a href="/lessons/{{lesson.id}}"><font color="black"><b>{{ lesson.title }}</b></a></td>
        {% endifequal %}
      {% endifequal %}
  </tr>
{% endfor %}
</table>
{% endblock %}